package com.fzj.example.design.flyweight;

/**
* @Description 具体享元角色
* @Author  fanzj
* @Date   2020/5/10 3:07 下午
* @Param  
* @Return      
* @Exception   
* 
*/
public class ConcreteFlyweight implements Flyweight {

    private String key;

    public ConcreteFlyweight() {
    }

    public ConcreteFlyweight(String key) {
        this.key = key;
        System.out.println("具体享元create....");
    }

    @Override
    public void createOption(UnsharedConcreteFlyweight unsharedConcreteFlyweight) {
        System.out.print("具体享元"+key+"被调用，");
        System.out.println("非享元信息是:"+unsharedConcreteFlyweight.getInfo());
    }
}
